<html>
<head><meta charset="utf-8"><title>align dyn repr · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html">align dyn repr</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="239684787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/239684787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#239684787">(May 21 2021 at 01:40)</a>:</h4>
<p>this PR <a href="https://github.com/rust-lang/rust/pull/85466">https://github.com/rust-lang/rust/pull/85466</a> broken rust-clippy on ci, how can I fix it as it's a submodule.</p>



<a name="239692593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/239692593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#239692593">(May 21 2021 at 03:50)</a>:</h4>
<p>It has been no longer a submodule for some time... Just uninit the submodule and checkout the branch again.</p>



<a name="239748119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/239748119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#239748119">(May 21 2021 at 13:15)</a>:</h4>
<p><span class="user-mention" data-user-id="116773">@csmoe</span> I' saw you claimed the issue!</p>



<a name="239748133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/239748133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#239748133">(May 21 2021 at 13:15)</a>:</h4>
<p>I'll take a look at the PR, I wanted to double check the general plans</p>



<a name="239750044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/239750044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#239750044">(May 21 2021 at 13:29)</a>:</h4>
<p>thanks <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="242832110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/242832110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#242832110">(Jun 16 2021 at 05:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/align.20dyn.20repr/near/239748133">said</a>:</p>
<blockquote>
<p>I'll take a look at the PR, I wanted to double check the general plans</p>
</blockquote>
<p>it has been a while, may I have your review?</p>



<a name="242991401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/242991401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#242991401">(Jun 17 2021 at 09:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116773">@csmoe</span> ack! sorry</p>



<a name="243016034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243016034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243016034">(Jun 17 2021 at 13:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116773">@csmoe</span> ok so --- this is going in the right direction.</p>



<a name="243016350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243016350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243016350">(Jun 17 2021 at 13:24)</a>:</h4>
<p>The next step would be that the <code>WhereClause</code> type should really be unified with <code>Predicate</code></p>



<a name="243016394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243016394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243016394">(Jun 17 2021 at 13:24)</a>:</h4>
<p>the idea is for it to become a <code>Binder&lt;Predicate&gt;</code> which binds a single type (the <code>Self</code> type)</p>



<a name="243017000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243017000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243017000">(Jun 17 2021 at 13:29)</a>:</h4>
<p>thanks <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span> I'll move on</p>



<a name="243017402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243017402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243017402">(Jun 17 2021 at 13:31)</a>:</h4>
<p>thanks for pinging me, please feel free to do that sooner in the future :)</p>



<a name="243017422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243017422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243017422">(Jun 17 2021 at 13:31)</a>:</h4>
<p>you understand the next steps, <span class="user-mention" data-user-id="116773">@csmoe</span> ?</p>



<a name="243021829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243021829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243021829">(Jun 17 2021 at 14:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> sorry, not sure if I got your words, I was imaging to rewrite <code>WhereClause</code> as <code>Binder&lt;Predicate&gt;</code>, then binds the Self type with <code>with_self_ty</code> like this <a href="https://github.com/rust-lang/rust/pull/85466/files#diff-4864ab6ed9e5cec3c6d0d561211554aafbd0094842869d2a711b5451151bc534R743">https://github.com/rust-lang/rust/pull/85466/files#diff-4864ab6ed9e5cec3c6d0d561211554aafbd0094842869d2a711b5451151bc534R743</a></p>



<a name="243021942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243021942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243021942">(Jun 17 2021 at 14:03)</a>:</h4>
<p>yes, so <code>with_self_ty</code> basically becomes "instantiating" the binder</p>



<a name="243021967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243021967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243021967">(Jun 17 2021 at 14:03)</a>:</h4>
<p>there is a binder now but it's different</p>



<a name="243021986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243021986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243021986">(Jun 17 2021 at 14:03)</a>:</h4>
<p>e.g., if you have <code>dyn Fn(&amp;())</code></p>



<a name="243022018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022018">(Jun 17 2021 at 14:03)</a>:</h4>
<p>that is kind of <code>forall&lt;'a&gt; exists&lt;T&gt; T: Fn(&amp;'a ())</code></p>



<a name="243022028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022028">(Jun 17 2021 at 14:03)</a>:</h4>
<p>the current Binder is the "forall"</p>



<a name="243022035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022035">(Jun 17 2021 at 14:03)</a>:</h4>
<p>the binder I am talking about is the "exists"</p>



<a name="243022091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022091">(Jun 17 2021 at 14:04)</a>:</h4>
<p>maybe we want to flip the order there actually</p>



<a name="243022101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022101">(Jun 17 2021 at 14:04)</a>:</h4>
<p>actually I think for sure we do</p>



<a name="243022126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022126">(Jun 17 2021 at 14:04)</a>:</h4>
<p><code>exists&lt;T&gt; { forall&lt;'a&gt; { T: Fn(&amp;'a ()) }</code></p>



<a name="243022158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022158">(Jun 17 2021 at 14:04)</a>:</h4>
<p>we do because if yo have <code>dyn Fn(&amp;()) + for&lt;'b&gt; Trait2&lt;&amp;'b ()&gt;</code></p>



<a name="243022202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022202">(Jun 17 2021 at 14:04)</a>:</h4>
<p>that would be <code>exists&lt;T&gt; { forall&lt;'a&gt; { T: Fn(&amp;'a()) }, forall&lt;'b&gt; { T: Trait2&lt;&amp;'b ()&gt; } }</code></p>



<a name="243022208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243022208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243022208">(Jun 17 2021 at 14:05)</a>:</h4>
<p>does that make sense, <span class="user-mention" data-user-id="116773">@csmoe</span> ?</p>



<a name="243026409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/align%20dyn%20repr/near/243026409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/align.20dyn.20repr.html#243026409">(Jun 17 2021 at 14:32)</a>:</h4>
<p>okay I think I get it, thks <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>